<ui:composition template="/template/template-professor.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:define name="corpo">
		<p:panel style="font-size: 10px !important; margin-bottom: 5% !important;">
			Inserção dos dados -> <h:outputText style="color: #999999 !important;" value="Upload das fotos"/>
		</p:panel>
        <h:form id="pa">
            <div style="margin-left: 30%; width: 500px !important; padding-bottom: 5% !important;">
				<p:panel style="margin-bottom:10px; display: table-cell; vertical-align: middle; font-size: 13px !important; background-color: #90b4bd">

					<p:selectOneMenu id="filo" value="#{cadastraFitoManagedBean.filo}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Filo" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listFilo}"/>
						<p:ajax update="classe ordem familia genero especie Submit"
								listener="#{cadastraFitoManagedBean.fetchAllClasses()}" />
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>
					<p:selectOneMenu id="classe" value="#{cadastraFitoManagedBean.classe}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Classe" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listClasse}" />
						<p:ajax update="ordem familia genero especie Submit"
								listener="#{cadastraFitoManagedBean.fetchAllOrdens()}" />
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>
					<p:selectOneMenu id="ordem" value="#{cadastraFitoManagedBean.ordem}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Ordem" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listOrdem}" />
						<p:ajax update="familia genero especie Submit"
								listener="#{cadastraFitoManagedBean.fetchAllFamilias()}" />
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>
					<p:selectOneMenu id="familia" value="#{cadastraFitoManagedBean.familia}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Familia" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listFamilia}" />
						<p:ajax update="genero especie Submit"
								listener="#{cadastraFitoManagedBean.fetchAllGenero()}" />
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>
					<p:selectOneMenu id="genero" value="#{cadastraFitoManagedBean.genero}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Genero" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listGenero}" />
						<p:ajax update="especie Submit"
								listener="#{cadastraFitoManagedBean.fetchAllEspecie()}" />
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>
					<p:selectOneMenu id="especie" value="#{cadastraFitoManagedBean.especie}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Especie" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listEspecie}" />
						<p:ajax update="Submit"
								listener="#{cadastraFitoManagedBean.fetchAllFitolito()}"/>
					</p:selectOneMenu>
					<p:commandButton icon="ui-icon-plus" style="font-size: 10px !important; float: right !important; margin-left: -20px !important"/>
					<br/>

					<p:separator/>

					<p:selectOneMenu id="estado" value="#{cadastraFitoManagedBean.estado}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Estado" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listEstado}"/>
						<p:ajax update="Submit cidade"
							listener="#{cadastraFitoManagedBean.fetchAllCidade()}"/>
					</p:selectOneMenu>
					<br/>
					<p:selectOneMenu id="cidade" value="#{cadastraFitoManagedBean.cidade}" height="150" style="margin-bottom: 5px !important; width: 120px !important;">
						<f:selectItem itemLabel="Cidade" itemValue="" itemDisabled="true"/>
						<f:selectItems value="#{cadastraFitoManagedBean.listCidade}"/>
					</p:selectOneMenu>

					<p:separator/>

					<h:outputText value="Retirada: "/>
					<p:inputMask id="Retirada" value="#{cadastraFitoManagedBean.retirada}" mask="99/99/9999"/> 
					<br/>
					<h:outputText value="Disponível para busca?" style="margin-right: 15px !important;"/>
					<p:selectBooleanCheckbox id="Disponivel" value="#{cadastraFitoManagedBean.disponivel}" style="margin-top: 15px !important;"/>


                    <p:separator />

					<p:commandButton style="margin-bottom: 35px !important; margin-top: 20px !important;" value="Avançar" id="Submit" action="cadastrar-fito-upload" />
<!--					<p:commandButton style="margin-bottom: 4% !important;" value="Avançar" id="Submit" disabled="#{not pesquisaManagedBean.isReady}" action="#{pesquisaManagedBean.findFitoP()}" />-->
				</p:panel>
            </div>

        </h:form>
    </ui:define>
</ui:composition>